<template>
  <div id="ceShiVuex002">
    测试vuex的分路径2
    <hr/>
    vuex的共享数据-----{{this.$store.state.count}}-----得到getters里的数据--{{this.$store.getters.computedCount(3)}}
    <br/>
    <el-button type="primary" @click="doObj" style="font-size: 5px;color: #ff0000">更改vuex的共享数据</el-button>
  </div>
</template>
<script>
import store from '../../vuex/store001'
export default {
  name: "ceShiVuex002",store,
  methods:{
    doObj(){
      // this.$store.commit('incCount',{amount:2});
      this.$store.dispatch('incMutaionsCount',{amount:2})//触发action里的方法
    }
  }
}
</script>
<style scoped>
</style>
